package com.qiaoba.api.job.entity.dto;

import com.qiaoba.common.base.validate.AddGroup;
import com.qiaoba.common.base.validate.EditGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 定时任务-更改状态-DTO
 *
 * @author ailanyin
 * @date 2023-09-19 22:15:44
 */
@Data
public class JobUpdateStatusDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "任务ID")
    @NotNull(message = "任务ID不能为空")
    @Size(max = 20, message = "任务ID不能超过{max}个字符", groups = {EditGroup.class})
    private String jobId;

    @Schema(description = "任务状态（1正常 0暂停）")
    @Size(max = 1, message = "任务状态不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String status;
}
